Xbasic

ON_DATABASE_INIT Function

Syntax

C on_database_init(C code )

Arguments

code

A character string that can be interpreted as Xbasic or Xdialog commands.

Description

ON_DATABASE_INIT() executes the Code_String when Alpha Anywhere opens the database.

Discussion

Example

Both the following examples display the following dialog box.

images/FU_ON_DATABASE_INIT.gif

The first example defines Xdialog code that is executed.

dim code as C
Code = 
ui_msg_box("Hello","It was nice of you to return")
%code%
on_database_init(code)

The second example defines Xbasic code that is executed.

dim code as C
code = "ui_msg_box(" + quote("Hello") + ", " + quote("It was nice of you to return") + ")"
on_database_init(code)

Limitations

Desktop applications only.

See Also